#ifndef _AFFECTION_H_
#define _AFFECTION_H_
#include "gDefine.h"
#include "MgrBase.h"
#include "SimpleRefection.h"

class AffectorBase;
class Selector;
class Reactor;
class TEachValidators;
class TObjValidators;
struct EventArgBase;
class Affection:public ReflectionBase
{
	DECL_REFLECTION(Affection, "../../config/Affection.xml");
public:
	bool ProcessAffection(Reactor * pReactor,EventArgBase& rEventArgs) const ;
	rewrite virtual void OnArchieveReaded();
	int32 m_iID;
	std::string m_sDisplayName;
	int32 m_iActionID;
	int32 m_iSelectorID;
	int32 m_iSelfValidator;
	
	int32 m_iAffector1Type;
	int32 m_iAffector1ID;
	int32 m_iEachValidator1;
	int32 m_iTargetValidator1;

	int32 m_iAffector2Type;
	int32 m_iAffector2ID;
	int32 m_iEachValidator2;
	int32 m_iTargetValidator2;

	int32 m_iAffector3Type;
	int32 m_iAffector3ID;
	int32 m_iEachValidator3;
	int32 m_iTargetValidator3;

	std::vector<const AffectorBase*> m_vAffectors;
	std::vector<const TEachValidators*> m_vEachValidators;
	std::vector<const TObjValidators*> m_vTargetValidators;
	const Selector * m_pSelector;
	const TObjValidators* m_pSelfValidators;
	
};
typedef DefMangerTpl<Affection> AffectionManager;

#endif